home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98a.txt / 000162_icon-group-sender _Wed Apr 15 13:05:27 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id NAA20516
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 15 Apr 1998 13:05:26 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA23516; Wed, 15 Apr 1998 13:05:25 -0700
  7. Posted-Date: Wed, 15 Apr 1998 14:36:36 -0500 (CDT)
  8. Message-Id: <3.0.5.32.19980415143501.00a3a330@post.its.mcw.edu>
  9. X-Sender: cdt@post.its.mcw.edu
  10. X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32)
  11. Date: Wed, 15 Apr 1998 14:35:01
  12. To: DLucido <DLucido@aol.com>, icon-group@optima.CS.Arizona.EDU
  13. From: Chris Tenaglia <cdt@post.its.mcw.edu>
  14. Subject: Re: Tables of records
  15. In-Reply-To: <78201599.35340ec3@aol.com>
  16. Mime-Version: 1.0
  17. Content-Type: text/plain; charset="us-ascii"
  18. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  19. Status: RO
  20. Content-Length: 757
  21.  
  22. We do this extensively.
  23. Even better is that the index of the table
  24. does not have to be numeric. It can be
  25. string, or set, or anything...
  26. Chris.
  27.  
  28. At 09:34 PM 4/14/98 EDT, DLucido wrote:
  29. >...
  30. >records with  the following code:
  31. >record node(value,lchild,rchild)
  32. >
  33. >procedure main(arg)
  34. >
  35. >   tree:=table()
  36. >   tree[1]:=node(2,3,"Hello")
  37. >   tree[2]:=node(5,6,"World")
  38. >   tree[3]:=node(0,1,"Oops")
  39. >
  40. >   every i:=key(tree)do
  41. >    write(i,":",tree[i].rchild)
  42. >
  43. >end
  44. >
  45. >While the order of the keys in unpredictable, the code can store a table of
  46. >records.
  47. >Is this a feature or something that should be avoided?
  48. >
  49. >                                                         David Lucido
  50. >                                                          dlucido@aol.com
  51.  
  52.  
  53.